Heap Garbage Collection in XSB: Practice and Experience

نویسندگان

  • Bart Demoen
  • Konstantinos Sagonas
چکیده

Starting from a theoretical understanding of the issues involved in the implementation of a heap garbage collector in a logic programming system with built-in tabling, and from an actual collector that did not take tabling (i.e. suspended computations) into account we have build two working heap garbage collectors (one mark&slide, one mark&copy) for XSB on top of a CHAT implementation model for the suspension/resumption of consumers. We discuss implementation issues and decisions that are general to heap garbage collections for the WAM and issues that are speciic to an implementation with tabling: as such, this paper documents our implementation and can serve as guidance for anyone attempting a similar feat. We report on the behaviour of the garbage collectors on diierent kinds of programs. In particular we present gures on the extent of internal fragmentation and the eeectiveness of early reset in Prolog systems which were made possible through having implemented the garbage collectors.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Heap Memory Management in Prolog with Tabling: Principles and Practice

We address memory management aspects of WAM-based logic programming systems that support tabled evaluation through the use of a suspension/resumption mechanism. We describe the memory organization and usefulness logic of such systems, and issues that have to be resolved for effective and efficient garbage collection. Special attention is given to early reset in the context of suspended computat...

متن کامل

Accurate garbage collection in uncooperative environments revisited

Implementing a concurrent programming language such as Java by the means of a translator to an existing language is attractive as it provides portability over all platforms supported by the host language and reduces development time – as many low-level tasks can be delegated to the host compiler. The C and C++ programming languages are popular choices for many language implementations due to th...

متن کامل

Copying garbage collection for WAM-based prolog systems

High-level programming languages like Prolog free the programmer from the burden of explicit memory management. In Prolog, dynamic memory allocation is done implicitly by creating data structures. The deallocation of data structures which are no longer in use, is the responsibility of the run-time system. Many Prolog implementations are based on the Warren Abstract Machine (WAM), a virtual mach...

متن کامل

Leveled Garbage Collection

Generational garbage collection (GGC) is one of the most popular garbage collection techniques. GGC gains a performance advantage by performing minor collections on the younger objects in the heap, reducing the number of major collections of the whole heap. A promotion policy determines when an object moves from the younger generation to the older. The design of GGC has been justified by the pl...

متن کامل

Reducing Sweep Time for a Nearly Empty Heap

Mark and sweep garbage collectors are known for using time proportional to the heap size when sweeping memory, since all objects in the heap, regardless of whether they are live or not, must be visited in order to reclaim the memory occupied by dead objects. This paper introduces a sweeping method which traverses only the live objects, so that sweeping can be done in time dependent only on the ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2000